SourceForge.net Logo

Ohloh project report for domingo

Development Rules

The following is list of requirements and recommendations of coding rules as to be used for domingo developers. The word must identicates a required rule, the word should identifies a recommentation.

Encoding

All files are and must be encoded in UTF-8.

In non-XML files, all locale-specific characters must be properly encoded, especially in Java- and properties-files

Java Format

The Java code format of domingo is based in the SUN specification with some extensions and restrictions. All required rules are documented in the checkstyle configuration files .

Important rules

No Tabs
Never use Tabs, always use 4 spaces
Header
Start every file with the correct header
JavaDoc
Document extensivly every file, class, method, parameter, return value and exception
Imports
Avoid Star Imports, always explicitly import every class seperately
White Space
Always place a single white space before/after/between operands, keywords and braces
Blocks
Kepp all opening braces at the end of a line, keep 'else', 'catch', 'finally' in the same line as preceeding the closing brace
Final Parameters
Make all parameters final to disallow changing a parameter

Java identifiers

Donot use abbreviated names when ever possible for all Java identifiers like local variables, parameters, fields or method names. Use camel-case to concatenate seperate words. E.g. a local variable holding a calendar entry should be named calendarEntry and not ce

There are a few exceptions for allowed abbreviations, because either they are commonly known and used or because the identifiers might get too long:

  • Unid for universal-identifier
  • e for exceptions

static variables must be final and must be written in all upper-case characters with an underscore as seperator, e.g. DEFAULT_LEVEL.

Prefixes

Donot use an prefixes except for fields that should start with a small f. Parameters and local variables must not use any prefixes.

JUnit Tests

When ever possible, write JUnit tests for your code to ensure functionality in the current and all future releases.

There are three types of files in the test folder:

Standard tests
These tests require a local installed Lotus Notes client and should run without error before a new version of domingo is released.
Stand-alone JUnit tests
These tests can run without any external software, especially without an installed Lotus Notes client or Domino server. These test should also run without error before a new version of domingo is released.
Samples
These classes are not JUnit tests, only examples to demonstrate the capabilities of domingo in simple use-cases.